package com.lyx.testmap;

import com.lyx.entity.Student;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

public class TestMap02 {

    public static void main(String[] args) {
        TreeMap<String, Student> hashMap2 = new TreeMap<String, Student>();

        Student student1 = new Student(1,"张三",16,90.3);
        Student student2 = new Student(9,"李四",16,89.5);
        Student student3 = new Student(8,"老六",16,55.0);
        Student student4 = new Student(4,"王五",16,80.0);
        Student student5 = new Student(3,"老六",16,55.0);
        Student student6 = new Student(6,"老七",26,55.0);

        hashMap2.put(student6.getName(),student6);
        hashMap2.put(student1.getName(),student1);
        hashMap2.put(student2.getName(),student2);
        hashMap2.put(student4.getName(),student4);
        hashMap2.put(student3.getName(),student3);
    }
}
